<html>
<head>
<title>RChart, User Guide</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" leftmargin="35">
<h3>RCHART, User Guide</h3>
<p><font face="Arial, Helvetica, sans-serif" size="-1"><i>Copyright 2005, J4L 
  Components (http://www.java4less.com)</i></font> <br>
  <a href="tutorialcontents.html">Go bak to contents</a></p>
<hr>
<h3><font face="Arial, Helvetica, sans-serif">Piechart configuration </font></h3>
<p><font face="Arial, Helvetica, sans-serif" size="-1">The following is a complete 
  example of a Piechart:</font></p>
<table width="100%" border="0">
  <tr> 
    <td width="31%" valign="top" bgcolor="#CCCCCC"> 
      <div align="center"><font color="#000000"><b><i>Parameters</i></b></font></div>
    </td>
    <td width="25%" valign="top" bgcolor="#CCCCCC"> 
      <div align="center"><font color="#000000"><b><i>Description</i></b></font></div>
    </td>
    <td width="44%" valign="top" bgcolor="#CCCCCC"> 
      <div align="center"><font color="#000000"><b><i>Equivalent java class/property</i></b></font></div>
    </td>
  </tr>
  <tr> 
    <td width="31%" valign="top" height="432"> 
      <p>TITLECHART=Sales 1999 <br>
        LEGEND_FILL=WHITE LEGEND_VERTICAL=FALSE LEGEND_BORDER=0.2|0x0|NORMAL SERIE_1=Pie 
        <br>
        SERIE_TYPE_1=PIE SERIE_DATA_1=94|48|28 PIE_NAME_1=Products PIE_NAME_2=Services 
        PIE_NAME_3=Other <br>
        PIE_STYLE_1=RED<br>
        PIE_STYLE_2=BLUE PIE_STYLE_3=GREEN PIECHART_3D=true PIE_LABEL_FORMAT=#VALUE# 
        (#PERCENTAGE#) SERIE_LABELS_1=Products|Services|Other SERIE_TOGETHER_1=true|false|true 
        LEGEND_POSITION=TOP LEGEND_MARGIN=0.3 CHART_BORDER=0.2|0x0|NORMAL CHART_FILL=0x99cccc</p>
    </td>
    <td width="25%" valign="top" height="432"> 
      <p><i><font color="#3333FF">Text of the title<br>
        Legend background<br>
        Legend layout<br>
        Legend border<br>
        Name of the serie<br>
        Type of the series<br>
        Values to be plotted<br>
        Name of first slice (first value)<br>
        Name of second slice (second value)<br>
        Name of third slice (third value) <br>
        Colors of the slices<br>
        <br>
        <br>
        Draw as 3D pie<br>
        Format of the labels<br>
        <br>
        <br>
        Detached slices?<br>
        Position of the legend<br>
        Margin reserved for the legend<br>
        Border of the chart<br>
        Background </font></i></p>
    </td>
    <td width="44%" valign="top" height="432"> 
      <div align="left"> 
        <p>new Title(&quot;...&quot;);<br>
          legend.background=Color.white;<br>
          legend.verticalLayout=false;<br>
          piePlotter=new PiePlotter();<br>
          serie=new PieDataSerie(values,styles,detachedFlags,pieLabels);<br>
          <br>
          see <i>values</i> in the constructor of PieDataSerie<br>
          legend.addItem(&quot;Products&quot;,GraphicsProvider.getColor(ChartColor.RED));<br>
          <br>
          <br>
          see <i>styles</i> in the constructor of PieDataSerie<br>
          <br>
          <br>
          piePlotter.effect3D=true;<br>
          piePlotter.labelFormat=&quot;#VALUE# (#PERCENTAGE#) &quot;;<br>
          <br>
          see <i>pieLabels</i> in the constructor of PieDataSerie<br>
          see <i>detachedFlags</i> in the constructor of PieDataSerie</p>
        <p>&nbsp;</p>
        <p>&nbsp; </p>
      </div>
    </td>
  </tr>
</table>
<p>&nbsp;</p>
<p><font face="Arial, Helvetica, sans-serif" size="-1"><img src="images/piechart.png" width="262" height="242"></font></p>
<p>&nbsp;</p>
<p><font face="Arial, Helvetica, sans-serif" size="-1">The SERIE_TOGETHER_1 parameters 
  is used to control which slices are detached from the pie.</font></p>
<table width="100%" border="0" height="56">
  <tr> 
    <td width="30%" valign="top" bgcolor="#CCCCCC"> 
      <div align="center"><font color="#000000"><b><i>Parameters</i></b></font></div>
    </td>
    <td width="26%" valign="top" bgcolor="#CCCCCC"> 
      <div align="center"><font color="#000000"><b><i>Description</i></b></font></div>
    </td>
    <td width="44%" valign="top" bgcolor="#CCCCCC"> 
      <div align="center"><font color="#000000"><b><i>Equivalent java class/property</i></b></font></div>
    </td>
  </tr>
  <tr> 
    <td width="30%" valign="top" height="44"> 
      <p>SERIE_TOGETHER_1=true|true|true </p>
    </td>
    <td width="26%" valign="top" height="44"> 
      <p><i><font color="#3333FF">No detached slices</font></i></p>
    </td>
    <td width="44%" valign="top" height="44"> 
      <div align="left"> 
        <p>see <i>detachedFlags</i> in the constructor of PieDataSerie</p>
      </div>
    </td>
  </tr>
</table>
<p>&nbsp;</p>
<p><font face="Arial, Helvetica, sans-serif" size="-1"><img src="images/pieChart_NoDetached.png" width="236" height="138"></font></p>
<p>&nbsp;</p>
<p><font face="Arial, Helvetica, sans-serif" size="-1">The size of the pie can 
  be changed using the PIECHART_RADIUS parameter.</font></p>
<table width="100%" border="0" height="56">
  <tr> 
    <td width="30%" valign="top" bgcolor="#CCCCCC"> 
      <div align="center"><font color="#000000"><b><i>Parameters</i></b></font></div>
    </td>
    <td width="26%" valign="top" bgcolor="#CCCCCC"> 
      <div align="center"><font color="#000000"><b><i>Description</i></b></font></div>
    </td>
    <td width="44%" valign="top" bgcolor="#CCCCCC"> 
      <div align="center"><font color="#000000"><b><i>Equivalent java class/property</i></b></font></div>
    </td>
  </tr>
  <tr> 
    <td width="30%" valign="top" height="44"> 
      <p>PIECHART_RADIUS=0.5 </p>
    </td>
    <td width="26%" valign="top" height="44"> 
      <p><i><font color="#3333FF">Half of the size of the normal size (default 
        is 1)</font></i></p>
    </td>
    <td width="44%" valign="top" height="44"> 
      <div align="left"> 
        <p>piePlotter.radiusModifier=0.5;</p>
      </div>
    </td>
  </tr>
</table>
<p><font face="Arial, Helvetica, sans-serif" size="-1"><img src="images/pieChart_Size.png" width="215" height="135"></font></p>
<p>&nbsp;</p>
<p><font face="Arial, Helvetica, sans-serif" size="-1">The SERIE_DISTCENTER_1 
  defines the position of the labels:</font></p>
<table width="100%" border="0" height="56">
  <tr> 
    <td width="30%" valign="top" bgcolor="#CCCCCC"> 
      <div align="center"><font color="#000000"><b><i>Parameters</i></b></font></div>
    </td>
    <td width="26%" valign="top" bgcolor="#CCCCCC"> 
      <div align="center"><font color="#000000"><b><i>Description</i></b></font></div>
    </td>
    <td width="44%" valign="top" bgcolor="#CCCCCC"> 
      <div align="center"><font color="#000000"><b><i>Equivalent java class/property</i></b></font></div>
    </td>
  </tr>
  <tr> 
    <td width="30%" valign="top" height="44"> 
      <p>SERIE_DISTCENTER_1=0.5 </p>
    </td>
    <td width="26%" valign="top" height="44"> 
      <p><i><font color="#3333FF">default is 1.</font></i></p>
    </td>
    <td width="44%" valign="top" height="44"> 
      <div align="left"> 
        <p>serie.textDistanceToCenter=0.5</p>
      </div>
    </td>
  </tr>
</table>
<p><font face="Arial, Helvetica, sans-serif" size="-1"><img src="images/piechart_dist.png" width="203" height="127"></font></p>
<p>&nbsp;</p>
<p><font face="Arial, Helvetica, sans-serif" size="-1">You can also place the 
  labels outside the pie and draw lines from the slice to the labels:</font></p>
<table width="100%" border="0" height="56">
  <tr> 
    <td width="30%" valign="top" bgcolor="#CCCCCC"> 
      <div align="center"><font color="#000000"><b><i>Parameters</i></b></font></div>
    </td>
    <td width="26%" valign="top" bgcolor="#CCCCCC"> 
      <div align="center"><font color="#000000"><b><i>Description</i></b></font></div>
    </td>
    <td width="44%" valign="top" bgcolor="#CCCCCC"> 
      <div align="center"><font color="#000000"><b><i>Equivalent java class/property</i></b></font></div>
    </td>
  </tr>
  <tr> 
    <td width="30%" valign="top" height="44"> 
      <p>PIE_LABEL_LINE=0.2|0x0|NORMAL <br>
        SERIE_DISTCENTER_1=1.4 </p>
    </td>
    <td width="26%" valign="top" height="44"> 
      <p><i><font color="#3333FF">Draw label lines<br>
        Draw labels outside the pie</font></i></p>
    </td>
    <td width="44%" valign="top" height="44"> 
      <div align="left"> 
        <p>piePlotter.labelLine=new LineStyle(...);<br>
          serie.textDistanceToCenter=1.4</p>
      </div>
    </td>
  </tr>
</table>
<p><font face="Arial, Helvetica, sans-serif" size="-1"><img src="images/piechart_lines.png" width="266" height="147"></font></p>
<p>&nbsp;</p>
<p><font face="Arial, Helvetica, sans-serif" size="-1">If you set PIECHART_3D 
  to false, a 2D pie will be painted:</font></p>
<table width="100%" border="0" height="56">
  <tr> 
    <td width="30%" valign="top" bgcolor="#CCCCCC"> 
      <div align="center"><font color="#000000"><b><i>Parameters</i></b></font></div>
    </td>
    <td width="26%" valign="top" bgcolor="#CCCCCC"> 
      <div align="center"><font color="#000000"><b><i>Description</i></b></font></div>
    </td>
    <td width="44%" valign="top" bgcolor="#CCCCCC"> 
      <div align="center"><font color="#000000"><b><i>Equivalent java class/property</i></b></font></div>
    </td>
  </tr>
  <tr> 
    <td width="30%" valign="top" height="21"> 
      <p>PIECHART_3D=false<br>
        PIE_BORDER=0.2|0x0|NORMAL </p>
    </td>
    <td width="26%" valign="top" height="21"> 
      <p><i><font color="#3333FF">2D pie<br>
        Border of the pie, only for 2D pie that do not have detached slices.</font></i></p>
    </td>
    <td width="44%" valign="top" height="21"> 
      <div align="left"> 
        <p>piePlotter.effect3D=false;<br>
          piePlotter.border =new LineStyle(...);</p>
      </div>
    </td>
  </tr>
</table>
<p><font face="Arial, Helvetica, sans-serif" size="-1"><img src="images/pieChart2D.png" width="270" height="285"></font></p>
<p>&nbsp;</p>
<p><font face="Arial, Helvetica, sans-serif" size="-1">You can define the format 
  of the labels using PIE_LABEL_FORMAT. The following variables can be use: #VALUE#, 
  #PERCENTAGE# and #LABEL#. For example, the following format: &quot;#LABEL# = 
  #PERCENTAGE#&quot; would produce this output: &quot;ItemA = 35%&quot;. See SERIE_LABELS 
  parameter. </font></p>
<table width="100%" border="0" height="56">
  <tr> 
    <td width="30%" valign="top" bgcolor="#CCCCCC"> 
      <div align="center"><font color="#000000"><b><i>Parameters</i></b></font></div>
    </td>
    <td width="26%" valign="top" bgcolor="#CCCCCC"> 
      <div align="center"><font color="#000000"><b><i>Description</i></b></font></div>
    </td>
    <td width="44%" valign="top" bgcolor="#CCCCCC"> 
      <div align="center"><font color="#000000"><b><i>Equivalent java class/property</i></b></font></div>
    </td>
  </tr>
  <tr> 
    <td width="30%" valign="top" height="21"> 
      <p>PIE_LABEL_FORMAT=#LABEL# = #PERCENTAGE# <br>
        SERIE_LABELS_1=Products|Services|Other </p>
    </td>
    <td width="26%" valign="top" height="21"> 
      <p><i><font color="#3333FF">Format of the labels in the pie<br>
        <br>
        Values for the #LABEL# variable</font></i></p>
    </td>
    <td width="44%" valign="top" height="21"> 
      <div align="left"> 
        <p>piePlotter.labelFormat<br>
          <br>
          see <i>pieLabels</i> in the constructor of PieDataSerie </p>
      </div>
    </td>
  </tr>
</table>
<p><font face="Arial, Helvetica, sans-serif" size="-1"><img src="images/piechartLabels.png" width="292" height="183"> 
  </font></p>
<p>&nbsp;</p>
<p><font face="Arial, Helvetica, sans-serif" size="-1">SERIE_PERCENTAGES_1: &quot;True&quot; 
  or &quot;False&quot;. If true the labels will be displayed as percentage, if 
  false as absolute value.Only used if the PIE_LABEL_FORMAT parameter is empty. 
  </font></p>
<p>&nbsp;</p>
<table width="100%" border="0" height="56">
  <tr> 
    <td width="30%" valign="top" bgcolor="#CCCCCC"> 
      <div align="center"><font color="#000000"><b><i>Parameters</i></b></font></div>
    </td>
    <td width="26%" valign="top" bgcolor="#CCCCCC"> 
      <div align="center"><font color="#000000"><b><i>Description</i></b></font></div>
    </td>
    <td width="44%" valign="top" bgcolor="#CCCCCC"> 
      <div align="center"><font color="#000000"><b><i>Equivalent java class/property</i></b></font></div>
    </td>
  </tr>
  <tr> 
    <td width="30%" valign="top" height="21"> 
      <p>SERIE_PERCENTAGES_1=FALSE </p>
    </td>
    <td width="26%" valign="top" height="21"> 
      <p><i><font color="#3333FF">Absolute values will be displayed as label (not 
        percentages). </font></i></p>
    </td>
    <td width="44%" valign="top" height="21"> 
      <div align="left"> 
        <p>serie.drawPercentages=false;</p>
      </div>
    </td>
  </tr>
</table>
<p><font face="Arial, Helvetica, sans-serif" size="-1"><img src="images/piechartLabels2.png" width="208" height="156"> 
  </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="-1"><br>
  </font></p>
<hr>
<p>&nbsp;</p>
</body>
</html>
